cmake_minimum_required(VERSION 3.16)
project(QT_Chart)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_PREFIX_PATH C:/Qt/Qt5.14.2/5.14.2/msvc2017_64/lib/cmake)
find_package(Qt5Core REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Charts REQUIRED)
find_package(Qt5DataVisualization REQUIRED)
set(QT5_LIBS Qt5::Core Qt5::Widgets Qt5::Gui Qt5::Charts Qt5::DataVisualization)

# -----------------------------------------------------------------------------------
AUX_SOURCE_DIRECTORY(. SOURCE_DIR)

add_executable(${PROJECT_NAME} ${SOURCE_DIR} Resources.qrc)

target_link_libraries(${PROJECT_NAME} ${QT5_LIBS})

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)